<!doctype html>
<html lang="zh-CN">

<head>
    <!-- 必须的 meta 标签 -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="static/css/bootstrap.min.css">

    <title>OpenNav-登录页</title>
</head>

<body background="static/img/bg.jpeg" style="background-color:black;">
    <div class="container-fluid">
        <div style="margin-top: 18rem; left: 40%; width: 400px; position: absolute;">
            <div style="text-align: center;">
                <span style="font-size:xx-large; color:white;">OpenNav系统登录</span>
            </div>
            <div>
                <form action="/login" method="POST">
                    <div class="form-group">
                        <label for="exampleInputEmail1" style="color: black;">用户名：</label>
                        <input type="text" name="username" class="form-control" id="exampleInputEmail1"
                            aria-describedby="emailHelp">
                        <!-- <small id="emailHelp" class="form-text text-muted">请输入用户名</small> -->
                    </div>
                    <div class="form-group">
                        <label for="exampleInputPassword1" style="color: black;">密&nbsp;&nbsp;&nbsp;&nbsp;码：</label>
                        <input type="password" name="password" class="form-control" id="exampleInputPassword1"
                            aria-describedby="pwdHelp">
                        <!-- <small id="pwdHelp" class="form-text text-muted">请输入密码</small> -->
                    </div>
                    <!-- <div class="form-group form-check">
                        <input type="checkbox" class="form-check-input" id="exampleCheck1">
                        <label class="form-check-label" for="exampleCheck1">Check me out</label>
                    </div> -->
                    <button type="submit" class="btn btn-light" style="margin-left: 40%; width: 100px;">登录</button>
                </form>
            </div>

            {% if error %}
        <!-- <div style="margin-top:1rem; left: 40%; width: 400px; position: absolute;"> -->
            <div class="alert alert-danger alert-dismissible fade show" role="alert"
            style="margin-top:1rem; left: -10%; width: 500px; position: absolute;">
                <strong>登录失败！</strong>{{error}}
                <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
        <!-- </div> -->
        {% endif %}
        </div>
        

    </div>


    <!-- jQuery and Bootstrap Bundle (includes Popper) -->
    <script src="static/js/jquery-3.5.1.slim.min.js"></script>
    <script src="static/js/bootstrap.bundle.min.js"></script>
</body>

</html>